import base64
import json

import pickle
from django.test import TestCase

# Create your tests here.

# pickle.dumps 将字典字符串转化为bytes类型
# pickle.loads 将bytes转化为字典字符串
# base64.b64decode() 将bytes类型转化为16进制bytes
# base64.b64encode() 将16进制bytes转化为字母类型bytes类型
if __name__ == '__main__':
    pass
    # req_data = 'gAN9cQAoSwF9cQEoWAUAAABjb3VudHECSwJYCAAAAHNlbGVjdGVkcQOIdUsDfXEEKGgCSwFoA4l1dS4='
    # res = pickle.loads(base64.b64decode(req_data.encode()))
    # print(res)
    # res = {1: {'count': 2, 'selected': True}, 3: {'co
    # a = {'count': 2, 'selected': True}
    # print(json.loads(a))